home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectDraw / DirectSurfaceWrite / readme.txt < prev    next >
Encoding:
Text File  |  2001-10-10  |  1.4 KB  |  38 lines

  1. //-----------------------------------------------------------------------------
  2. // 
  3. // Sample Name: DirectSurfaceWrite Sample
  4. // 
  5. // Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
  6. // 
  7. //-----------------------------------------------------------------------------
  8.  
  9.  
  10. Description
  11. ===========
  12.   DirectSurfaceWrite demonstrates how to write directly to a DirectDraw surface.
  13.  
  14. Path
  15. ====
  16.   Source:     DXSDK\Samples\Multimedia\DDraw\DirectSurfaceWrite
  17.  
  18.   Executable: DXSDK\Samples\Multimedia\DDraw\Bin
  19.  
  20. User's Guide
  21. ============
  22.   DirectSurfaceWrite requires no user input. Press the ESC key to quit the program.
  23.  
  24. Programming Notes
  25. =================
  26.   For details on how to setup a full-screen DirectDraw app, see the FullScreenMode 
  27.   sample. 
  28.  
  29.   To write directly on a DirectDraw surface first call IDirectDrawSurface::Lock 
  30.   to obtain a pointer directly into the memory of the DirectDraw surface.  While
  31.   the surface is locked, the surface can not be blted or flipped onto other surfaces. 
  32.   The surface's pixel format will tell you the data format the surface stores pixels
  33.   in.  Be sure to advance the surface pointer by the surface pitch instead of the surface 
  34.   width, since the surface may be wider than its width.  After the drawing is finished 
  35.   call IDirectDrawSurface::Unlock to allow the surface to blt to other surfaces.  See 
  36.   DrawSprite() in this sample for an example of how this is done.  
  37.   
  38.